window.onload = function () {
    // 全选与取消全选
    // 获取元素
    var all = document.getElementById("allCheckBox");//allCheckBox是一个全选全不选的复选框
    var boxs = document.getElementsByClassName("cartCheckBox");//选中表格主体部分所有的checkbox
    all.onclick = function () {
        if (all.checked) {
            for (let i = 0; i < boxs.length; i++) {
                box = boxs[i];
                box.checked = true;
            }
        } else {
            for (let i = 0; i < boxs.length; i++) {
                box = boxs[i];
                box.checked = false;
            }
        }
    }
}